import React from 'react'
import { Form, DatePicker } from 'antd'
const FormItem = Form.Item

import { FormWidgetProps } from '../FormWidgetRender/WidgetRender'

function index({newSchema}: FormWidgetProps) {
  const { fieldName, ui, props } = newSchema
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
  const { colSpan = 12, offset = 0, ...formItemReset } = ui
  const attribute: any = { size: 'middle', placeholder: '请选择', ...props }
  return (
    <FormItem
      {...formItemReset}
      name={fieldName}
    >
      <DatePicker {...attribute} />
    </FormItem>
  )
}
export default index
